Skip to content

Run rate limiter garbage collection before inserting new user#866

Merged
tnull merged 1 commit intolightningdevkit:mainfrom
joostjager:rate-limiter-gc
Apr 3, 2026
Merged

Run rate limiter garbage collection before inserting new user#866
tnull merged 1 commit intolightningdevkit:mainfrom
joostjager:rate-limiter-gc

Conversation

@joostjager
Copy link
Copy Markdown
Contributor

Efficiency improvement

@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented Apr 2, 2026

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

Move the GC pass from after insertion to before, so that stale entries
are reclaimed before allocating a new bucket. This avoids unnecessary
growth of the user map between GC cycles.

AI tools were used in preparing this commit.
@joostjager joostjager marked this pull request as ready for review April 2, 2026 14:36
@joostjager joostjager requested a review from tnull April 2, 2026 14:36
Copy link
Copy Markdown
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tnull tnull merged commit 9863649 into lightningdevkit:main Apr 3, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants